#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int missingNumber(int* nums, int numsSize)
{
	int N = numsSize;
	int x = 0;
	for (int i = 0; i < numsSize; i++)
	{
		x ^= nums[i];
	}
	for (int j = 0; j <= N; j++)
	{
		x ^= j;
	}
	return x;
}
int main()
{
	int nums[] = { 9,8,5,7,4,6,2,0,3 };
	int numsSize = sizeof(nums) / sizeof(nums[0]);
	int a = missingNumber(nums, numsSize);
	printf("%d\n", a);
	return 0;
}